package cn.dankal.flyaudio.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

import cn.dankal.basiclib.base.recyclerview.BaseRecyclerViewAdapter;
import cn.dankal.basiclib.base.recyclerview.BaseRecyclerViewHolder;
import cn.dankal.basiclib.pojo.ChildrenBean;
import cn.dankal.basiclib.util.image.PicUtils;
import cn.dankal.flyaudio.R;
import cn.dankal.flyaudio.entity.GroupEntity;
import cn.jpush.im.android.api.model.UserInfo;

/**
 * <pre>
 *     e-mail : junfeng.nie@duntech.com.cn
 *     time   : 3/8/2020
 *     desc   :
 *     version: cn.dankal.flyaudio.adapter
 *     Copyright: Copyright（c）2018
 *     Company:
 * </pre>
 *
 * @author niejunfeng
 */
public class ItemPickContractImgAdapter extends BaseRecyclerViewAdapter<UserInfo> {
    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_pick_contract_img;
    }

    @Override
    protected BaseRecyclerViewHolder getViewHolder(ViewGroup parent, View rootView, int viewType) {
        return new ItemPickContractImgAdapter.ViewHolder(rootView);
    }

    class ViewHolder extends BaseRecyclerViewHolder<UserInfo> {

        public ViewHolder(View itemView) {
            super(itemView);
        }

        @Override
        public void onBindData(UserInfo data, int position) {
            ImageView avatarView = itemView.findViewById(R.id.item_iv_avatar);
            PicUtils.loadAvatar(data.getAvatarFile(),avatarView);
        }
    }
}